package com.itjob.scott.listener;

import java.util.ArrayList;

import javax.servlet.ServletContextEvent;
import javax.servlet.ServletContextListener;

import com.itjob.scott.entity.ChatEntity;
import com.itjob.scott.entity.UserEntity;

public class ApplicationListener implements ServletContextListener {
	
	/**
	 * 初始化
	 */
	public void contextInitialized(ServletContextEvent event) {
		event.getServletContext().setAttribute("chats", new ArrayList<ChatEntity>());
		event.getServletContext().setAttribute("users", new ArrayList<UserEntity>());
	}

	public void contextDestroyed(ServletContextEvent event) {
		
	}


}
